package com.study.d027shape2d;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.effect.BlendMode;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Ellipse;
import javafx.scene.shape.Line;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.StrokeLineJoin;
import javafx.scene.shape.StrokeType;
import javafx.stage.Stage;

/** 扇形
*@description
*@author xtayhame
*date 2020年3月21日
*version
*since v1.0
*/
public class ArcMain extends Application{
	public static void main(String[] args) {
		launch(args);
	}
	@Override
	public void start(Stage stage) throws Exception {
		AnchorPane anchorPane = new AnchorPane();
		HBox box = new HBox(10);

		Arc a1 = new Arc(0, 0, 100, 100, 45, 100);
		a1.setType(ArcType.ROUND);

		Arc a2 = new Arc();
		//设置中心点
		a2.setCenterX(0);
		a2.setCenterY(0);

		//设置x,y轴的长度
		a2.setRadiusX(80);
		a2.setRadiusY(100);

		//设置度数
		a2.setLength(270);

		//闭合
		//a2.setType(ArcType.CHORD);
		//打开
		//a2.setType(ArcType.OPEN);

		//圆角
		a2.setType(ArcType.ROUND);



		box.getChildren().addAll(a1,a2);
		anchorPane.getChildren().add(box);
		AnchorPane.setTopAnchor(box, 30.0);
		stage.setScene(new Scene(anchorPane, 800, 500));
		stage.show();
	}
}
